<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dhj/provincecity/Sys_ProvinceCity.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dhj/provincecity/Sys_ProvinceCity.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'CityId',
                footer: "Foots",
                cnName: '省份城市',
                name: 'provincecity/Sys_ProvinceCity',
                url: "/Sys_ProvinceCity/",
                sortName: "CityId"
            });
            const editFormFields = ref({"CityName":"","CitySize":"","CityCode":""});
            const editFormOptions = ref([[{"title":"城市名字","field":"CityName"},
                               {"dataKey":"城市大小","data":[],"title":"城市大小","field":"CitySize","type":"radio"},
                               {"title":"城市编码","field":"CityCode"}]]);
            const searchFormFields = ref({"CityName":"","CitySize":"","CityCode":""});
            const searchFormOptions = ref([[{"title":"城市名字","field":"CityName","type":"like"},{"dataKey":"城市大小","data":[],"title":"城市大小","field":"CitySize","type":"select"},{"title":"城市编码","field":"CityCode"}]]);
            const columns = ref([{field:'CityName',title:'城市名字',type:'string',width:110,align:'left',sort:true},
                       {field:'CitySize',title:'城市大小',type:'string',bind:{ key:'城市大小',data:[]},width:110,align:'left'},
                       {field:'CityCode',title:'城市编码',type:'string',width:110,align:'left'},
                       {field:'ProvinceId',title:'省份号',type:'int',width:80,hidden:true,align:'left'},
                       {field:'CityId',title:'序号',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
